package com.example.demo.controller;

import com.example.demo.dto.ResponseResult;
import com.example.demo.service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/app/route")
public class RouteController {

    @Autowired
    private RouteService routeService;

    @GetMapping("/get/detail")
    public ResponseResult<Map<String, Object>> getRouteDetail(@RequestParam(defaultValue = "1") Long routeId) {
        Map<String, Object> data = routeService.getRouteDetail(routeId);
        return new ResponseResult<>(200,"响应成功！",data);
    }
}
